<div>
    <yu-panel title="营销活动管理">
        <yu-xform related-table-name="refTable" form-type="search" ref="actInfoSearch" :custom-search-fn="searchFn">
            <yu-xform-group :column="4"  >
                <yu-xform-item label="活动名称" placeholder="活动名称" name="marketName" ctype="input"></yu-xform-item>
                <yu-xform-item label="活动来源" placeholder="活动来源" name="actSource" ctype="select" data-code="ACT_SOURCE"></yu-xform-item>
                <yu-xform-item   label="活动举办支行" placeholder="活动举办支行" :options="options1" ctype="select"
                               name="issusOrg"></yu-xform-item>
                <!--                <yu-xform-item placeholder="活动主办方" name="actSponsor" ctype="input"></yu-xform-item>-->
                <!--                <yu-xform-item placeholder="活动合作方" name="actPartner" ctype="input"></yu-xform-item>-->
                <!--   <yu-xform-item label="活动性质" placeholder="活动性质" name="actType" ctype="select" data-code="ACT_TYPE"></yu-xform-item>-->
<!--                   <yu-xform-item label="活动状态" placeholder="活动状态" name="actStatus" ctype="select"-->
<!--                                 data-code="ACT_STATUS"></yu-xform-item>-->
                <!--  <yu-xform-item label="活动开始时间" placeholder="活动开始时间" name="actStartTime" ctype="datepicker"></yu-xform-item>-->
               <!--   <yu-xform-item label="活动结束时间" placeholder="活动结束时间" name="actEndTime" ctype="datepicker"></yu-xform-item>-->
              </yu-xform-group>
          </yu-xform>
          <div class="yu-toolBar">
              <yu-button-group>
                  <yu-button icon="plus" @click="addFn" v-if="zsgxButton">新增</yu-button>
                  <yu-button icon="edit" @click="modifyFn" v-if="zsgxButton">修改</yu-button>
                  <yu-button icon="document" @click="infoFn" v-if="zsgxButton">详情</yu-button>
                  <yu-button icon="el-icon-delete2" @click="deleteFn" v-if="zsgxButton">删除</yu-button>
                  <yu-button icon="el-icon-caret-bottom" @click="issusFn" v-if="zhxfButton1">总行下发</yu-button>
                  <yu-button icon="el-icon-caret-bottom" @click="mgrFPVFn" v-if="zhxfButton2">支行下发</yu-button>
                  <yu-button type="warning" v-loading="loading"  @click="exportExcel()" >导出数据</yu-button>
              </yu-button-group>
          </div>
          <yu-xtable ref="refTable" row-number :data-url="dataUrl" :pageable=true selection-type="checkbox" :base-params="actInfoParams">
              <yu-xtable-column label="活动编号" prop="actId" width="120" v-if="false"></yu-xtable-column>
              <yu-xtable-column label="营销活动名称" prop="marketName" width="120"></yu-xtable-column>
              <yu-xtable-column label="活动要求" prop="actContent" width="120"></yu-xtable-column>
              <yu-xtable-column label="活动合作方" prop="actPartner" width="120"></yu-xtable-column>
              <yu-xtable-column label="活动开始时间" prop="actStartTime" width="100" value-format="yyyy-MM-dd" :formatter="dateFormat"></yu-xtable-column>
              <yu-xtable-column label="活动结束时间" prop="actEndTime" width="100" value-format="yyyy-MM-dd" :formatter="dateFormat"></yu-xtable-column>
              <yu-xtable-column label="活动性质" prop="actType" width="120" data-code="ACT_TYPE"></yu-xtable-column>
              <yu-xtable-column label="上级活动" prop="upAct" width="120"></yu-xtable-column>
              <yu-xtable-column label="活动负责人编号" prop="actLeader" width="120"></yu-xtable-column>
              <yu-xtable-column label="活动负责人名称" prop="actLeaderName" width="120"></yu-xtable-column>
              <yu-xtable-column label="活动人数" prop="actCustNum" width=""></yu-xtable-column>
              <yu-xtable-column label="活动状态" prop="actStatus" width="120" data-code="ACT_STATUS"></yu-xtable-column>
              <yu-xtable-column label="创建人编号" prop="createUser" width="120"></yu-xtable-column>
              <yu-xtable-column label="创建人名称" prop="createUserName" width="120"></yu-xtable-column>
              <yu-xtable-column label="创建时间" prop="createTime" width="" :formatter="dateTimeFormat"></yu-xtable-column>
              <yu-xtable-column label="最后修改人编号" prop="lastUpdateUser" width="120"></yu-xtable-column>
              <yu-xtable-column label="最后创建人名称" prop="lastUpdateUserName" width="120"></yu-xtable-column>
              <yu-xtable-column label="最后更新时间" prop="lastUpdateTime" width="" :formatter="dateTimeFormat"></yu-xtable-column>
              <yu-xtable-column label="具体活动地址" prop="actAddress" width="" v-if="false"></yu-xtable-column>
          </yu-xtable>
          <!-- 说明dialog可配置宽高属性，若不配置则宽度默认为屏幕50%，高度自适应
              width="650px" height="380px" -->
        <yu-xdialog :title="viewTitle[viewType]" :visible.sync="dialogVisible" width="850px">
            <yu-xform ref="refForm" label-width="130px" v-model="formdata" :disabled="formDisabled" :rules="rules">
                <yu-xform-group :column="2">
                    <yu-xform-item label="编号" name="id" ctype="input" v-show="false"></yu-xform-item>
                    <yu-xform-item label="活动名称" name="marketName" ctype="input" :disabled="marketNameDisable"></yu-xform-item>
                    <!--                    <yu-xform-item label="活动主办方" name="actSponsor" ctype="input" :disabled="actSponsorDisable"></yu-xform-item>-->
                    <!--                    <yu-xform-item label="活动合作方" name="actPartner" ctype="input" :disabled="actPartnerDisable"></yu-xform-item>-->
                    <yu-xform-item label="开始时间" name="actStartTime" ctype="datepicker" rules="required"  value-format="yyyy-MM-dd" :disabled="actStartTimeDisable"></yu-xform-item>
                    <yu-xform-item label="结束时间" name="actEndTime" ctype="datepicker" rules="required" value-format="yyyy-MM-dd" :disabled="actEndTimeDisable"></yu-xform-item>
                    <yu-xform-item label="活动要求" name="actContent" ctype="textarea"   :disabled="actTypeDisable"></yu-xform-item>
                    <!--                    <yu-xform-item label="活动负责人编号" name="actLeader" ctype="input"></yu-xform-item>-->
<!--                    <yu-xform-item label="活动负责人" name="actLeaderName" v-model="formdata.actLeaderName" :disabled="actLeaderNameDisable" ctype="yufp-mgr-selector" v-if="actLeaderNameShow" @select-fn="chooseExecUser"></yu-xform-item>-->
<!--                    <yu-xform-item label="活动人数" name="actCustNum" ctype="input" v-if="actCustNumShow"></yu-xform-item>-->
                    <yu-xform-item label="活动状态" name="actStatus" ctype="select" data-code="ACT_STATUS" v-if="actStatusShow"></yu-xform-item>
                    <!--                    <yu-xform-item label="创建人编号" name="createUser" ctype="input"></yu-xform-item>-->
                    <!--                    <yu-xform-item label="创建人名称" name="createUserName" ctype="input"></yu-xform-item>-->
                    <!--                    <yu-xform-item label="创建时间" name="createTime" ctype=""></yu-xform-item>-->
                    <!--                    <yu-xform-item label="最后修改人编号" name="lastUpdateUser" ctype="input"></yu-xform-item>-->
                    <!--                    <yu-xform-item label="最后创建人名称" name="lastUpdateUserName" ctype="input"></yu-xform-item>-->
                    <!--                    <yu-xform-item label="最后更新时间" name="lastUpdateTime" ctype=""></yu-xform-item>-->
                    <yu-xform-item label="活动编号" name="actId" ctype="input" v-show="false"></yu-xform-item>
                    <yu-xform-item label="上级活动" name="upAct" ctype="input" v-if="upActShow"></yu-xform-item>
<!--                    <yu-xform-item label="具体活动地址" name="actAddress" ctype="textarea" :rows="3"-->
<!--                                   :colspan="24" v-if="actAddressShow"></yu-xform-item>-->
                </yu-xform-group>
                <div class="yu-grpButton">
                    <yu-button v-show="saveBtnShow" icon="check" type="primary" @click="saveFn" v-loading="loadingB">保存</yu-button>
                    <yu-button icon="yx-undo2" type="primary" @click="cancelFn">取消</yu-button>
                </div>
            </yu-xform>
        </yu-xdialog>

        <el-dialog-x title="分配客户经理" :visible.sync="mgrFPVisible" width="450px">
            <yu-xform ref="mgrFPVisibleForm" label-width="150px" form-type="edit" v-model="mgrFPFormdata"
                      :rules="rules">
                <yu-xform-group :column="1">
                    <yu-xform-item label="客户经理选择" placeholder="请选择客户经理" ctype="yufp-mgr-selector" v-model="mgrFPFormdata.userID"
                                   name="userID"></yu-xform-item>
                </yu-xform-group>
            </yu-xform>
            <div slot="footer" align="center">
                <el-button type="primary"  @click="saveMgrFP"  v-loading="loadingE" >确 定</el-button>

<!--               -->
                <el-button >取 消</el-button>
<!--                @click="cancelMgrFn"-->
            </div>
        </el-dialog-x>

        <el-dialog-x title="下发" :visible.sync="issusVisible" width="450px">
            <yu-xform ref="issusVisibleForm" label-width="150px" form-type="edit" v-model="issusFormdata"
                      :rules="rules">
                <yu-xform-group :column="1">
                    <!--                    <yu-xform-item label="客户经理选择" placeholder="请选择客户经理" ctype="yufp-mgr-selector" v-model="issusFormdata.userID"-->
                    <!--                                   name="userID"></yu-xform-item>-->
                    <yu-xform-item label="编号" name="id" ctype="input" v-model="issusFormdata.id"></yu-xform-item>
                    <yu-xform-item label="活动编号" name="actId" ctype="input" v-model="issusFormdata.actId"></yu-xform-item>
                    <yu-xform-item ref="execTopyNum1" label="下发对象" ctype="yufp-org-tree" rules="required" :params="params" @select-fn="setOrgName" name="execTopyNum"></yu-xform-item>
                    <yu-xform-item label="执行对象名称" ctype="input" v-show="false" name="execTopyName" v-model="issusFormdata.execTopyName"></yu-xform-item>
                </yu-xform-group>
            </yu-xform>
            <div slot="footer" align="center">
                <el-button type="primary" @click="saveIssus" v-loading="loading">确 定</el-button>
                <el-button @click="cancelIssusFn">取 消</el-button>
            </div>
        </el-dialog-x>
    </yu-panel>
</div>
